package com.wxiao.exam.Impl;

import com.wxiao.exam.ExamQuestionService;
import com.wxiao.exam.ExamService;
import com.wxiao.exam.Result;
import com.wxiao.exam.mapper.ExamQuestionMapper;
import com.wxiao.exam.pojo.vo.ExamQuestionVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * <br/>
 * Created by wangxiao on 2019/07/09
 */
@Service("examQuestionService")
public class ExamQuestionServiceImpl implements ExamQuestionService {

    private final static Logger LOG = LoggerFactory.getLogger(ExamQuestionServiceImpl.class);

    @Resource
    private ExamQuestionMapper examQuestionMapper;

    @Autowired
    ExamService examService;

    @Override
    public Result addExamQuestion(ExamQuestionVO examQuestionVO, int i) throws Exception {
        Integer row = examQuestionMapper.addExamQuestion(examQuestionVO);
        if (row > 0) {
            return examService.updateExam(examQuestionVO, i);
        }

        return Result.getFailure("添加失败");
    }

    @Override
    public Result updateExamQuestion(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

    @Override
    public Result findDetailExamQuestion(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

    @Override
    public Result listExamQuestion(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

    @Override
    public Result listExamQuestionPage(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

    @Override
    public Result countExamQuestion(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

    @Override
    public Result deleteExamQuestion(ExamQuestionVO examQuestionVO) throws Exception {
        return null;
    }

}